using System.ComponentModel.DataAnnotations;

namespace FytSoa.Application.Erp.Param;

/// <summary>
/// 盘点单参数
/// </summary>
public class ErpTaskStockOrderParam
{
    /// <summary>
    /// 盘点名称
    /// </summary>
    [Required]
    [StringLength(50)]
    public string Title { get; set; }
    
    /// <summary>
    /// 库房编号
    /// </summary>
    public long WarehouseId { get; set; } = 0;

    /// <summary>
    /// 产品类型编号
    /// </summary>
    [Required]
    public long TypeId { get; set; } = 0;

    /// <summary>
    /// 盈亏金额
    /// </summary>
    [Required]
    public decimal PAL { get; set; } = 0;
    
    /// <summary>
    /// 备注
    /// </summary>
    public string Remark { get; set; }


    public List<StockProduct> Product { get; set; } = new();
    
    public class StockProduct
    {
        /// <summary>
        /// 产品编号
        /// </summary>
        public long Id { get; set; }

        public int SourceStock { get; set; } = 0;

        public int CheckStock { get; set; } = 0;

        /// <summary>
        /// 盈亏金额
        /// </summary>
        [Required]
        public decimal PAL { get; set; } = 0;
    }
}